/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chameleon.view.command;

import chameleon.model.NuGatManager.NuGatManager;
import chameleon.view.input.Input;

/**
 *
 * @author simon
 */
class ComputeLtlStrategyCommand extends Command {

    String[] condParam_;
    
    public ComputeLtlStrategyCommand(Input input, String[] command, boolean help) {
        super(input, false, help);
        condParam_ = command;
    }

    @Override
    public Input execute() {
        if(help_){
            outputManager_.displayString("This command compute the stratezgy for an ltl game\n"
                    + "compute_ltl_command : [-lt | -h] [-PLAYER|P1 P2] [-cond] "
                    + "[-k number] [-K number] [-w p|a|b|1|2]\n"
                    + "-h print the usage command\n"
                    + "-PLAYER : give the player\n"
                    + "-cond give the objective of the game\n"
                    + "-k Start value for k (default 0).\n"
                    + "-K End value for k (default 20).\n"
                    + "-w Whom games are played for: (p)rotagonist, (a)ntagonist,"+
      			"(b)oth, player (1), or player (2). Default: b\n");
        }
        else{
            InternalCheckCommand check = new InternalCheckCommand(input_, 2);
            if (check.isOk()){
                NuGatManager manager = (NuGatManager) input_.getManager();
                manager.computeLtlStrategy(condParam_);
            }
        }
        return input_;
    }
    
}
